﻿/**
 *  Lab19 is a space wehere I put AS3 classes I write for me, developing my works.
 * 	I hope they could be helpful for other peoples. I believe I can improve the code sharing it.
 * 
 *  This file is part of lab19.
 *  
 *  lab19 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License. 
 *  lab19 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  
 *   You should have received a copy of the GNU General Public License along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 * @author Copyright (C) 2007 officinanessuno
 * @version 0.1
*/

package lab19.events{
	
	import flash.events.Event;
	import fl.transitions.Tween;
	/**
	 * TweenManager Event, extends Event
	 */
	public class TweenManagerEvent extends Event{
					
		public static var MOTION_CHANGE:String="tweenChange";
		public static var MOTION_FINISH:String="tweenFinish";
		
		public var data:Object;
		/**
		 * the Event constructor</br/<br/>takes the type of the event and an object with these properties:<br/>tween: the tween the originally dispatches the change or finish event<br/>info: the object TweenManager uses to manage tween<br/><br/>for example in "data.info.id" you have the id of the tween originally dispatches the event
		 * @param	type
		 * @param	tweenInfo
		 * @see core.TweenManager
		 */
		public function TweenManagerEvent(type:String, tweenInfo:Object){
			data = tweenInfo;
			super(type);
		}
		
		/**
		 * just in case of redispathcing (thanks bit101)<br/>http://www.bit-101.com/blog/?p=1143
		 * @private
		 */
		public override function clone():Event {
			return new TweenManagerEvent(type, data);
		}

	}
}